CMDWSOps.cs
Code Type: C# Class
Uses Classes: CStatus, CMDWSTransfer, EmrSvcSoapClient

Uses MDWS Calls: isCosignerRequired, select, match, getNoteTitles, disconnect, getVHA, getAppointments, getConsultsForPatient, getVisits, getAdmissions, getTeams, getUserSecurityKeys, getSpecialties, getWards, getClinics, getPatientsByTeam, getPatientsBySpecialty, getPatientsByWard, getPatientsByClinic, cprsUserLookup, getPatientsByProvider, login, isValidEsig, writeNote, signNote, closeNote, getLabTests
Lines of Code: 669

public class CMDWSOps : CData

	CMDWSOps is used to access MDWS operations and move data to the central database It uses DataTrasnferLib to move data 

public bool IsCosignerRequired(string strNoteTitleIEN, string strAuthorDUZ)

	Is a cosigner required for this note title/user 

public CStatus TransferPatientByDFN(string strkey,
                                           string strDFN,
                                           out string strPatID)

	 transfer a patient by DFN 

public CStatus TransferMatchPatients(string strkey,
                                             long lMatchType,
                                             string strMatch,
                                             out long lCount)

	  tranfer MDWS patients that match criteria 

protected EmrSvcSoapClient GetMDWSSOAPClient()

	gets the soap client so we can talk to mdws 

public CStatus IsMDWSValid()

	 helper to determine if MDWS connection is valid 

public void Disconnect()

	disconnect from MDWs 

public CStatus TransferSites()

	get all MDWS sites by calling getVHA 

protected CStatus GetNextUserTarget(UserArray ua, out string strTarget)

	protectd helper to get the next user target 

protected CStatus GetNextClinicTarget(TaggedHospitalLocationArray ha,
                                              out string strTarget)

	 protectd helper to get the next clinic target 

protected CStatus GetNextNoteTitleTarget(TaggedTextArray tta, out string strTarget)

	 protected helper to get the next note title target 

public CStatus TransferNoteTitles(string strMatch)

	 gets note titles from MDWS and transfers them to the db 

public CStatus TransferPatientAppointments()

	 transfers a patients appointment to the central database 

public CStatus TransferPatientConsults()

	 transfers a patients consults to the central database 

public CStatus TransferPatientVisits(DateTime dtFrom, DateTime dtTo)

	 transfer patient visits 

public CStatus TransferPatientAdmissions()

	 transfer patient admissions to the central database 

public CStatus GetMDWSTeams()

	 gets teams from MDWS and moves them to the db 

public CStatus HasSecurityKey(long lUserID,
                                      string strKey)

	does a user have a specific key 

public CStatus GetMDWSSecurityKeys(
            long lUserID,
            bool bTransfer)

	 gets MDWS security keys and transfers them to the database 

public CStatus GetMDWSSpecialties()

	 gets specialties from MDWS and moves them to the db 

public CStatus GetMDWSWards()

	 gets wards from MDWS and moves them to the db 

public CStatus TransferClinics(string strMatch)

	 gets clinics from MDWS and moves them to the db 

public CStatus GetMDWSTeamPatients(long lTeamID)

	 transfers patients by teams to the db 

public CStatus GetMDWSMatchPatients(string strMatch)

	 tranfer MDWS patients that match criteria 

public CStatus GetMDWSSpecialtyPatients(long lSpecialtyID)

	 transfers patients by specialty to the db 

public CStatus GetMDWSWardPatients(long lWardID)

	 transfers patients by ward to the db 

public CStatus GetMDWSClinicPatients(
            long lClinicID,
            DateTime dtApptFrom,
            DateTime dtApptTo)

	 transfers patients by clinic to the db 

public CStatus TransferUsers(string strMatch)

	 transfers users containing the specified search string 

public CStatus GetMDWSUserPatients(long lUserID)

	 retrieves a list of the users patients and transfers them to the db 

protected CStatus Login(
            string strUN,
            string strPA,
            string strSiteList,
            string strContext,
            out UserTO toUser)

	another version of login that takes additional params used from the communicator and and clients that store sitelist and context in places other than a config file 

public CStatus MDWSLogin(string strUID,
                                  string strPWD,
                                  long lRegionID,
                                  long lSiteID,
                                  string strContext,
                                  out string strDUZ,
                                  out long lFXUserID,
                                  out EmrSvcSoapClient mdwsSOAPClient)

	 login to MDWS and transfer user to the db 

public CStatus WriteNote(
            string strPatientID,
            string strAuthorID,
            string strESignature,
            string strVisitLocationID,
            string strNoteTitleIEN,
            string strNoteText)

	   write a note to MDWS 

public CStatus WriteNote2(
           string strPatientID,
           string strAuthorID,
           string strNoteTitleIEN,
           string strEncounterID,//created and passed in
           string strNoteText,
           string strConsultIEN,
           string strCosignerDUZ,
           out string strTIUNoteID,
           out string strTIUNote) //A or H note

	write a note with no signing, left open for user to sign later in CPRS 

public CStatus GetMDWSLabTests(string strSearch)

	 transfers static lab test information from mdws to the vappct database 

	

